<?php
    /**
    * @Web site : teoynougi.com
    * @version  : 1.0
    * @author   : Teoynougi
    */


class Text {

    var $in;
    var $out;

    function Text( $text ){

        $this->in = $text
    }

    function read() {
        
    }

    function input() {
        
    }

    function filter() {

    }

    function excerpt( $text, $excerpt_length ) {

//        $excerpt_more = ' ...';
        
        $words = explode(' ', $text, $excerpt_length + 1);
        if (count($words) > $excerpt_length) {
            array_pop($words);
            $text = implode(' ', $words);
//            $text = $text . $excerpt_more;
        }
        return $text;
    }

    function strip_html( $text ) {
        $text = str_replace(']]>', ']]&gt;', $text);
        $text = strip_tags($text);

        return $text
    }

    function get_output() {
        return $this->out;
    }

    function the_output() {
        echo $this->out;
    }

    function str_limit($text, $length){
        if(strlen($text) > $length){
            $text = substr($text, 0, $length);
        return $text;
    }
}

?>